import Vue from 'vue'
import Vuex from 'vuex'
import userInfo from './modules/userInfo'


Vue.use(Vuex);

const store = new Vuex.Store({
  modules: {
    userInfo,
  },
  state:{
      code:"",
      theUserInfo: null
    },
  mutations:{
      setCode(state,value){
          state.code=value;
      },
      setTheUserInfo(state,value){
        state.theUserInfo = value;
      }
  },
    actions:{
        setCode(content,value){
            content.commit('setCode',value)
        },
        setTheUserInfo(content,value){
            content.commit("setTheUserInfo",value);
        }
    }
});

export default store;
